﻿<%@ Page ValidateRequest="false" %>
<%
	string path = Request.Form["PagePath"];
	if (path.StartsWith("/"))
	{
		path = Manager.MapPath(path);
		Manager.MakeSureFolderExist(System.IO.Path.GetDirectoryName(path));
		System.IO.File.WriteAllText(path, Request.Form["Html"], Encoding.UTF8);
		
		if (!String.IsNullOrEmpty(Request.Form["CssPath"]))
			System.IO.File.WriteAllText(Manager.MapPath(Request.Form["CssPath"]), Request.Form["Css"], Encoding.UTF8);
	}
%>
